<!DOCTYPE html>
<html lang="zh-cmn-Hans">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>鹿程智慧油站商户平台</title>
    <meta name="description" content="鹿程科技是提供加油站互联网化零管系统、营销及支付和大数据分析运营服务的行业领先科技公司。鹿程科技充分了解加油站行业的需求和新兴互联网的发展,依靠业内最先进的科技和标准化的运营,持续帮助油站业务发展创造价值。"
    />
    <meta name="keywords" content="智慧油站,鹿程,鹿程智慧油站,鹿程智慧油站微信支付,加油站微信支付,加油站营销管理" />
    <link rel="icon" href="https://static.zhihuiyouzhan.com.cn/static/styles/admin/img/title.ico" type="image/x-icon">
    <link rel="shortcut icon" href="https://static.zhihuiyouzhan.com.cn/static/styles/admin/img/title.ico" type="image/x-icon">
    <link rel="stylesheet" href="../layui/css/layui.css" />
    <link rel="stylesheet" href="../css/style.css" />
</head>

<body>
    <section class="refund-detail">
        <div class="car-rege-sele">
            <dl class="active">全部退款</dl>
            <dl >自定义退款</dl>
        </div>
        <div class="refund-detail-content">
            <p>您确定要为<span>黄金清纯小王子</span>退款<span>100</span>元吗？</p>
            <p style="display: none">您确定要为<span>黄金清纯小王子</span>退款<input  style="width: 100px;" type="text" class="layui-input" placeholder="0">元吗？</p>
        </div>
        <div class="refund-detail-btn">
            <button class="deer-btn">确定</button>
            <button class="deer-btns">取消</button>
        </div>
    </section>

<!--js-->
<aside>
    <script type="text/javascript" src="../layui/layui.js"></script>
    <script type="text/javascript">
        layui.use(['jquery','layer'], function () {
            var $ = layui.jquery;
            var layer=layui.layer;
            var num=0
            var index = parent.layer.getFrameIndex(window.name)
            $('.car-rege-sele>dl').bind('click',function (){   
                 num=$(this).index()
                $('.car-rege-sele>dl').eq(num).addClass('active').siblings().removeClass('active');
                $('.refund-detail-content>p').eq(num).show().siblings().hide()
            })
            
            $('.deer-btn').bind('click',function () {
                if(!num){
                    //ajax
                    $('.refund-detail').empty()
                    layer.msg('退款成功',{icon:1,time:2000},function () {
                        parent.layer.close(index)
                    })



                }else{
                    var val= $('.layui-input').val()
                    if(val==''){
                        return    layer.tips('您尚未输入任何金额','.layui-input',{tips:1})
                    }else if(!/^((?:[0-9]\d*))(?:\.\d{1,2})?$/.test(val)){
                        return layer.tips('您输入的格式不正确', '.layui-input', { tips: 1 })
                    }else{
                        //ajax

                         $('.refund-detail').empty()
                            layer.msg('退款成功', {icon:1,time:2000}, function () {
                            parent.layer.close(index)
                        })
                    }

                }

            })
            

        });
    </script>
    </script>
</aside>
<!--js-->




</body>

</html>